<script setup lang="ts">
import { reactive } from 'vue'

const obj = reactive({
  name: '张三',
  age: 12
})
const oneYear = () => {
  obj.age++
}
</script>

<template>
  <div>姓名：{{ obj.name }},年龄：{{ obj.age }}</div>
  <button @click="oneYear">过了一年</button>
</template>

<style lang="css" scoped></style>
